const Service = require('egg').Service;
class configurationService extends Service {
	// async findRsaPublicKey(id) {
	// 	const { ctx } = this;
  //   return await ctx.model.Configurations.findOne({
  //     where: { id },
  //     attributes: { exclude: ['rsa_private_key'] },
  //   });
	// }
	async findRsaPublicKey(id) {
    const { ctx } = this;
    return await ctx.model.Configurations.findOne({
      where: { id },
      attributes: { exclude: ['rsa_private_key'] },
    });
  }
	async update(body) {
		const { ctx } = this;
		return await ctx.model.Configurations.update(body, {
			where: {
				id: body.id,
			},
		});
	}
}
module.exports = configurationService;